import request from './request'

const http = {
    requestGet(url, params) {
        const config = {method: 'get', url: url}
        if(params){
            config.params = params
        }
        return request(config)
    },
    requestPost(url, params) {
        const config = {method: 'post', url: url}
        if(params){
            config.data = params
        }
        return request(config)
    }
}

export default http